package edu.nf.relaxenjoy.common.constant.auth;

import lombok.Getter;
import lombok.Setter;

/**
 * @author zhu
 * @date 2024-12-11
 */
public class AuthContextHolder {

    /**
     * 用户id
     */
    private static ThreadLocal<Long> userId = new ThreadLocal<>();

    public static void setUserId(Long id) {
        userId.set(id);
    }

    public static Long getUserId() {
        return userId.get();
    }
}
